package com.zy.ioc.pro6_ioc_scope;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @program: mavenTest153
 * @description:
 * @author: zy
 * @create: 2025-07-13 09:57
 */
@Component
//@Scope("singleton")   // 单例模式，默认值->非懒加载
@Scope("prototype") //原型 -》多例  -》懒加载
public class Product {

    public Product(){
        System.out.println("Product对象被创建了");
    }
}
